The present invention relates to a controller that operates in accordance with a program stored in a firmware storing memory, and, more particularly, to a controller mounted on an apparatus that performs the input and output of data with a computer.
Electronic apparatus mounts a microcomputer and a controller that controls the electronic apparatus in accordance with a command from the microcomputer. For example, the controller is mounted on not only computer peripheral device that performs the input and output of data with a computer and, but also electrical appliances, such as a CD player and a television set.
The program for operating the microcomputer is called firmware. The firmware is stored in a firmware storing memory connected to the microcomputer.
FIG. 1 is a schematic block diagram of a CD-ROM drive 40 as conventional computer peripheral device. The CD-ROM drive 40 is connected to a personal computer 30, and reads data recorded on an optical disc 20.
The CD-ROM drive 40 includes a pickup 2, a sled 3, a data processing circuit 4, a buffer RAM 5, a microcomputer 6, a firmware storing memory 7, and a connector 8. The data processing circuit 4 includes a data processing portion 9, an error correction portion 10, and an interface 11.
The pickup 2 reads the data recorded on the optical disc 20 by irradiating the predetermined position on the optical disc 20 with laser and reading the reflected light of this laser. The sled 3 moves the pickup 2 to the predetermined position on the optical disc 20. The data read by the pickup 2 is provided to the data processing circuit 4.
The data processing portion 9 of the data processing circuit 4 demodulates read data and stores demodulated data in the buffer RAM 5. The error correction portion 10 receives the demodulated data read from the buffer RAM 5 and performs error correction processing on the data using an error detection code (EDC) and an error correction code (ECC), and then stores error-corrected data in the buffer RAM 5. The interface 11 converts the error-corrected data read from the buffer RAM 5 to format data that conforms to the specifications of the Advanced Technology Attachment Packet Interface (ATAPI) or the Small Computer System Interface (SCSI), for example, and provides the format data to the connector 8. The connector 8 conforms to specifications unified with a connector 31 of the computer 30, for example, the SCSI or ATAPI specifications.
The read operation of the data from the buffer RAM 5 and the alignment of the sled 3 are performed in accordance with the command of the microcomputer 6. The firmware that is the operation program of the microcomputer 6 is stored in the firmware storing memory 7. The microcomputer 6 provides a command that matches various status to the data processing portion 9, the error correction portion 10, and the interface 11 in accordance with the firmware based on the output of the data processing portion 9, the error correction portion 10, and the interface 11 of the data processing circuit 4.
The firmware storing memory 7 can use an electrical writable nonvolatile memory, such as a flash memory or an EPROM, or a write-at-once type memory.
For example, firmware is written to the firmware storing memory 7 in accordance with the following two methods. In the first method, the firmware is written to a single memory using a ROM writer, and subsequently the memory is soldered on the printed circuit board (PC board) of the CD-ROM drive 40. The ROM writer is a data output unit for writing firmware. The ROM writer is directly connected to the firmware storing memory 7 and the firmware is written to the memory 7. The ROM writer can be substituted for a personal computer having an output terminal customized for the firmware storing memory 7. In the first method, after firmware is written, the work of soldering a memory on a PC board becomes necessary, and manufacturing costs increase. Further, since the firmware storing memory 7 cannot be integrated into an LSI (large scale integrated circuit) of a controller, the controller becomes large.
In the second method, a CD-ROM drive is manufactured without writing firmware to the firmware storing memory 7, and the firmware is written to the memory 7 after the CD-ROM drive is manufactured. The second method applies to the case where the firmware storing memory 7 is integrated into the LSI of the controller, for example. To write firmware to the firmware storing memory 7, the microcomputer 6 needs to be operated in accordance with a predetermined write program. However, the microcomputer 6 operates only when firmware is provided. Accordingly, a program for writing firmware is recorded in the microcomputer 6, and a mask ROM 12 having a relatively low capacity is connected. When firmware is written to the memory 7, a ROM writer for writing firmware is connected to the connector 8, and the firmware is written to the memory 7 when the microcomputer 6 operates in accordance with the program of the mask ROM 12. The program recorded in the mask ROM 12 is used to write firmware in the memory 7. Accordingly, the capacity of the mask ROM 12 is lower than that of a memory that stores all firmware. However, this mask ROM 12 is used only when it writes the firmware. Consequently, installing the mask ROM 12 increases the cost of a controller and increases the area of the integrated circuit of the controller.